Skip to content

Conversation

@zephyrbot
Copy link

@zephyrbot zephyrbot commented Mar 10, 2025

Backport 6f45f68~2..6f45f68 from #80800.

Fixes: #70344

The implementation for erasing pages in the flash_sam.c driver
indicated a successful erase after exceeding the last page to be
erased successfully. Since the last page has no proceeding page,
the succeeded status was not set.

This fix switches around the status to be set as succeeded before
erase begins, to have the succeeded status cleared if page unlock
or erase fails.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 9c6195a)
The flash erase-blocks property was a bit malformed, it has 254 pages
of size 8192 after the first 8 pages of size 2048 to reach the total
size of 2048K. This caused issues when trying to erase the last pages
of the flash, which caused the flash erase_blocks test suite to fail.

Adjust the erase-blocks to match the flash layout.

Signed-off-by: Bjarki Arge Andreasen <[email protected]>
(cherry picked from commit 6f45f68)
@zephyrbot zephyrbot added the Backport Backport PR and backport failure issues label Mar 10, 2025
@github-project-automation github-project-automation bot moved this to To do in Backports Mar 10, 2025
@zephyrbot zephyrbot added area: Flash platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) labels Mar 10, 2025
@kartben kartben merged commit 92dac91 into v4.1-branch Mar 13, 2025
28 of 30 checks passed
@kartben kartben deleted the backport-80800-to-v4.1-branch branch March 13, 2025 06:31
@github-project-automation github-project-automation bot moved this from To do to Done in Backports Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Flash Backport Backport PR and backport failure issues platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants